package com.smartcruise.main.mainFragment.messageNotice.messageNoticeDetail;

import android.content.Context;
import android.content.Intent;
import android.support.v4.app.Fragment;

import com.smartcruise.base.BaseFragmentActivity;
import com.smartcruise.data.PushData;
import com.smartcruise.util.IntentUtils;

/**
 * Created by FengChaoQun
 * on 2018/1/21 0021
 * 展示消息通知详情的activity
 */

public class MessageNoticeDetail extends BaseFragmentActivity {

    private PushData pushData;

    public static void start(Context context, PushData pushData) {
        Intent intent = new Intent(context, MessageNoticeDetail.class);
        intent.putExtra(IntentUtils.DATA, pushData);
        context.startActivity(intent);
    }

    @Override
    protected Fragment getFragment() {
        pushData = (PushData) getIntent().getSerializableExtra(IntentUtils.DATA);
        if (pushData != null) {
            switch (pushData.getType()) {
//                case SIGN_IN:
//                    return SignInDetailFragment.newInstance(messageNotice);
//                case EVENT:
//                    return EventDetailFragment.newInstance(messageNotice);
//                case EXCEPTION:
//                    return ExceptionDetailFragment.newInstance(messageNotice);
                case PushData.TYPE_NEW_TASK:
                case PushData.TYPE_TASK_AUDIT_RESULT:
//                    return AuditDetailFragment.newInstance(messageNotice);
            }
        }
        return null;
    }

    private void gotoSeeTask() {

    }
}
